<?php
namespace Admin\Controller;
use Common\Controller\AdminbaseController;

// +----------------------------------------------------------------------
// | Date:2017年10月14日
// +----------------------------------------------------------------------
// | Author: EK_熊<1439527494@qq.com>
// +----------------------------------------------------------------------
// | Description: 此文件作用于****
// +----------------------------------------------------------------------
class BrandController extends  AdminbaseController{
    
    public function index(){
        $model = M('Brand');
        $id = I('id',1);
        $map['id']=$id;
        if (IS_POST){
            $post = I('post');
            $post['content'] = htmlspecialchars_decode($post['content']);
            $ret = $model->where($map)->save($post);
            if ($ret) $this->success('保存成功！');
            $this->error('保存失败');
        }
        $detail = $model->where($map)->find();
        $this->assign('post',$detail);
        $this->display();
    }
    
    
}